package com.template.app.bean;

import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * Created by hanxq on 2014/5/30.
 */
public class DatatablePage<T> {
    private long recordsTotal;
    private long recordsFiltered;
    private List<T> data;//当前页每一行的内容

    public DatatablePage(List<T> data){
        PageInfo pageInfo = new PageInfo<T>(data);
        this.data=pageInfo.getList();
        this.recordsTotal = pageInfo.getTotal();
        this.recordsFiltered = pageInfo.getTotal();
    }

    public long getRecordsTotal() {
        return recordsTotal;
    }

    public void setRecordsTotal(long recordsTotal) {
        this.recordsTotal = recordsTotal;
    }

    public long getRecordsFiltered() {
        return recordsFiltered;
    }

    public void setRecordsFiltered(long recordsFiltered) {
        this.recordsFiltered = recordsFiltered;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }
}
